<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>EasyXPlus: easyClip.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">EasyXPlus
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">EasyXPlus is a simple graphic library for C++ BEGINNERS under Windows.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">easyClip.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#ifndef EASY_CLIP_H</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#define EASY_CLIP_H</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &lt;windows.h&gt;</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &quot;easyGeometry.h&quot;</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespace_easy_x_plus.html">EasyXPlus</a></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;{</div><div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="class_easy_x_plus_1_1_clip_region.html">   19</a></span>&#160;    <span class="keyword">class </span><a class="code" href="class_easy_x_plus_1_1_clip_region.html">ClipRegion</a></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;    {</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;    <span class="keyword">public</span>:</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> associateToWindow() = 0;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> cancelAssociation() = 0;</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    };</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="class_easy_x_plus_1_1_rect_clip_region.html">   33</a></span>&#160;    <span class="keyword">class </span><a class="code" href="class_easy_x_plus_1_1_rect_clip_region.html">RectClipRegion</a> : <span class="keyword">public</span> <a class="code" href="class_easy_x_plus_1_1_clip_region.html">ClipRegion</a></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    {</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    <span class="keyword">public</span>:</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        <span class="keyword">explicit</span> <a class="code" href="class_easy_x_plus_1_1_rect_clip_region.html">RectClipRegion</a>(<span class="keyword">const</span> <a class="code" href="class_easy_x_plus_1_1_rect_region.html">RectRegion</a>&amp; region);</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;        ~<a class="code" href="class_easy_x_plus_1_1_rect_clip_region.html">RectClipRegion</a>();</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;        <span class="keywordtype">void</span> exclude(<span class="keyword">const</span> <a class="code" href="class_easy_x_plus_1_1_rect_region.html">RectRegion</a>&amp; region);</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        <span class="keywordtype">void</span> intersect(<span class="keyword">const</span> <a class="code" href="class_easy_x_plus_1_1_rect_region.html">RectRegion</a>&amp; region);</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        <span class="keywordtype">void</span> unionn(<span class="keyword">const</span> <a class="code" href="class_easy_x_plus_1_1_rect_region.html">RectRegion</a>&amp; region);</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        <span class="keywordtype">void</span> move(<span class="keywordtype">int</span> horizontalOffset, <span class="keywordtype">int</span> verticalOffset);</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;        <span class="keywordtype">void</span> <span class="keyword">set</span>(<span class="keyword">const</span> <a class="code" href="class_easy_x_plus_1_1_rect_region.html">RectRegion</a>&amp; region);</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;        <span class="keywordtype">void</span> clear();</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> associateToWindow();</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> cancelAssociation();</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    <span class="keyword">private</span>:</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;        <span class="keywordtype">void</span> excludeRegion(<span class="keyword">const</span> <a class="code" href="class_easy_x_plus_1_1_rect_region.html">RectRegion</a>&amp; region);</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;        <span class="keywordtype">void</span> intersectRegion(<span class="keyword">const</span> <a class="code" href="class_easy_x_plus_1_1_rect_region.html">RectRegion</a>&amp; region);</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        <span class="keywordtype">void</span> unionRegion(<span class="keyword">const</span> <a class="code" href="class_easy_x_plus_1_1_rect_region.html">RectRegion</a>&amp; region);</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        <span class="keywordtype">void</span> moveRegion(<span class="keywordtype">int</span> offsets[2]);</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;        HRGN createRgnFromRegion(<span class="keyword">const</span> <a class="code" href="class_easy_x_plus_1_1_rect_region.html">RectRegion</a>&amp; region);</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    <span class="keyword">protected</span>:</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;        <span class="keyword">enum class</span> ClipType { Exclude, Intersect, Move, Union };</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;        <span class="keyword">union </span>ClipUnion {</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;            <span class="keyword">explicit</span> ClipUnion(<span class="keyword">const</span> <a class="code" href="class_easy_x_plus_1_1_rect_region.html">RectRegion</a>&amp; region);</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;            <span class="keyword">explicit</span> ClipUnion(<span class="keywordtype">int</span> horizontalOffset, <span class="keywordtype">int</span> verticalOffset);</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;            <span class="keyword">explicit</span> ClipUnion(<span class="keywordtype">int</span> scaleFactor);</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;            <a class="code" href="class_easy_x_plus_1_1_rect_region.html">RectRegion</a> region; </div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;            <span class="keywordtype">int</span> offsets[2]; </div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;            <span class="keywordtype">int</span> scaleFactor; </div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;        };</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;        HRGN regionHandle;</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;        std::vector&lt;std::pair&lt;ClipType, ClipUnion&gt;&gt; actions;    </div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    };</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;}</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="class_easy_x_plus_1_1_rect_clip_region_html"><div class="ttname"><a href="class_easy_x_plus_1_1_rect_clip_region.html">EasyXPlus::RectClipRegion</a></div><div class="ttdoc">A clip region class in rectangle shape. </div><div class="ttdef"><b>Definition:</b> easyClip.h:33</div></div>
<div class="ttc" id="class_easy_x_plus_1_1_rect_region_html"><div class="ttname"><a href="class_easy_x_plus_1_1_rect_region.html">EasyXPlus::RectRegion</a></div><div class="ttdoc">A class represents a rectangle area. </div><div class="ttdef"><b>Definition:</b> easyGeometry.h:55</div></div>
<div class="ttc" id="namespace_easy_x_plus_html"><div class="ttname"><a href="namespace_easy_x_plus.html">EasyXPlus</a></div><div class="ttdef"><b>Definition:</b> easyBitmap.h:15</div></div>
<div class="ttc" id="class_easy_x_plus_1_1_clip_region_html"><div class="ttname"><a href="class_easy_x_plus_1_1_clip_region.html">EasyXPlus::ClipRegion</a></div><div class="ttdoc">A clip region interface. </div><div class="ttdef"><b>Definition:</b> easyClip.h:19</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
